home *** CD-ROM | disk | FTP | other *** search
/ Colorado Rockies 2000 / Colorado Rockies 2000 by US West.iso / mac / xtras / Beatnik Xtra Lite / Beatnik Behaviors LiteD7.cst / 00005_Script_Stop RMF Lite Behavior < prev    next >
Text File  |  1998-10-22  |  4KB  |  137 lines

  1. -- Stop RMF Lite, a Beatnik Behavior
  2. -- by Paul Sebastien, pauls@sirius.com, http://www.bitstream.net/psykosonik
  3.  
  4. -- The 'Pro' version of this behavior will feature such additions as control over fade in and fade out upon starting and stopping the RMF files, ability to start, pause, or stop the RMF files from one behavior, and more. For more info, go to http://www.headspace.com/
  5.  
  6.  
  7.  
  8. global beatnik
  9.  
  10.  
  11.  
  12.  
  13.  
  14. property pWhichEvent
  15. property pWhichFile
  16. property pLoopState
  17.  
  18.  
  19. on getPropertyDescriptionList
  20.   
  21.   --  initialize the Beatnik Xtra instance
  22.   
  23.   --  instantiation script (below) is commented out, as it is not necessary to instantiate a new instance, since we are just stopping an existing one named 'beatnik'.
  24.   
  25.   
  26.   --  put "------------------------------"
  27.   --  if ilk(beatnik) = #instance then stop(beatnik)
  28.   --  set beatnik = VOID
  29.   --  set beatnik = new(xtra "beatnik",TRUE)
  30.   --  set bankFileName = the moviePath & "patches.hsb"
  31.   --  put "beatnik =" && beatnik
  32.   --  put "Bank =" && bankFileName
  33.   --  put "SetSampleLibrary(beatnik) = " & setsampleLibrary(beatnik, bankFileName)
  34.   --  put "SetReady(beatnik) = " & setReady(beatnik)
  35.   --  put "isReady(beatnik) = " & isReady(beatnik)
  36.   --  if not(isReady(beatnik)) then
  37.   --    alert "The Beatnik Xtra did not initialize, the Beatnik soundbank file 'patches.hsb' must be in the same folder as your current Director movie is in (or modify the path in the script). Also, make sure that the Xtra (BEATNIK.X32) is added to this movie."
  38.   --    exit
  39.   --  end if
  40.   --  --  finished initializing the Beatnik Xtra instance
  41.   --  
  42.   --  
  43.   
  44.   
  45.   
  46.   
  47.   
  48.   
  49.   
  50.   set d = [:]
  51.   
  52.   
  53.   addProp d, #pWhichEvent, [#default: "mouseDown", #format: #symbol, #range: [#mouseDown, #mouseUp, #mouseEnter, #mouseLeave, #mouseWithin,#enterFrame,#exitFrame], #comment: "Choose a trigger event:"]
  54.   addProp d, #pWhichFile, [#default: "", #format: #string, #comment: "RMF File to Stop:"]
  55.   
  56.   
  57.   
  58.   return d
  59.   
  60.   
  61.   
  62.   
  63.   
  64.   
  65.   
  66. end
  67.  
  68.  
  69.  
  70. on doIt me
  71.   global beatnik
  72.   stop(beatnik, the moviepath & pWhichFile)
  73.   
  74.   
  75.   
  76. end
  77.  
  78.  
  79.  
  80. on mouseDown me
  81.   if the pWhichEvent of me = #mouseDown then doIt me
  82.   
  83. end
  84.  
  85.  
  86. on mouseUp me
  87.   if the pWhichEvent of me = #mouseUp then doIt me
  88.   
  89.   
  90.   
  91. end
  92.  
  93.  
  94. on mouseEnter me
  95.   if the pWhichEvent of me = #mouseEnter then doIt me
  96.   
  97. end
  98.  
  99.  
  100. on mouseLeave me
  101.   if the pWhichEvent of me = #mouseLeave then doIt me
  102.   
  103. end
  104.  
  105. on mouseWithin me
  106.   if the pWhichEvent of me = #mouseWithin then doIt me
  107.   
  108. end
  109.  
  110.  
  111. on enterFrame me
  112.   if the pWhichEvent of me = #enterFrame then doIt me
  113.   
  114. end
  115.  
  116. on exitFrame me
  117.   if the pWhichEvent of me = #exitFrame then doIt me
  118.   
  119. end
  120.  
  121. on stopMovie
  122.   global beatnik
  123.   stop(beatnik)
  124.   closeBeatnik(beatnik)
  125.   set beatnik=VOID
  126.  
  127. end stopMovie
  128.  
  129.  
  130. on getBehaviorDescription
  131.   
  132.   
  133.   set description = "STOP RMF LITE BEHAVIOR" && RETURN & "by Paul Sebastien pauls@sirius.com" && RETURN && RETURN & "This Beatnik Behavior allows you to stop an RMF file that plays through a Beatnik Xtra instance named 'beatnik'. You can edit this behavior's script to choose a different instance name if necessary." && RETURN && RETURN & "PARAMETERS:" && RETURN && RETURN & "ò Choose an RMF file to stop:" && RETURN & "...Enter the name (and full path if not in the same directory as the movie) of the RMF file to stop." && RETURN && RETURN & "ò Choose a trigger event:" && RETURN & "...Lets you choose which Director event you want to trigger the stopping of the RMF file." && RETURN && RETURN &  "IMPORTANT:" && RETURN &&RETURN & "- This behavior requires that the Beatnik Xtra Lite is properly added to your Director project, and also, the Beatnik soundbank (patches.hsb) must be in the same directory as your Director project file, otherwise you should change the path to the soundbank in this behavior's script if the soundbank resides elsewhere." && RETURN && RETURN & "For more information on instantiating the Beatnik Xtra Lite, refer to the documentation or other Beatnik Xtra sample movies." && RETURN && RETURN & "To upgrade to Beatnik Behaviors Pro, or for more information on Beatnik-related products and music files, visit the Headspace web site at:" && RETURN && RETURN & "http://www.headspace.com"
  134.   
  135.   return description
  136. end
  137.